// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.characters.Moodles;

import java.util.Stack;
import zombie.characters.IsoGameCharacter;
import zombie.core.Color;

public final class Moodles {
    boolean MoodlesStateChanged = false;
    private Stack<Moodle> MoodleList = new Stack();
    private final IsoGameCharacter Parent;

    public Moodles(IsoGameCharacter parent) {
        this.Parent = parent;
        this.MoodleList.add(new Moodle(MoodleType.Endurance, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Tired, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Hungry, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Panic, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Sick, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Bored, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Unhappy, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Bleeding, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Wet, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.HasACold, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Angry, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Stress, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Thirst, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Injured, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Pain, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.HeavyLoad, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Drunk, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Dead, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Zombie, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.FoodEaten, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.Hyperthermia, this.Parent, 3));
        this.MoodleList.add(new Moodle(MoodleType.Hypothermia, this.Parent, 3));
        this.MoodleList.add(new Moodle(MoodleType.Windchill, this.Parent));
        this.MoodleList.add(new Moodle(MoodleType.CantSprint, this.Parent));
    }

    public int getGoodBadNeutral(int MoodleIndex) {
        return MoodleType.GoodBadNeutral(((Moodle)this.MoodleList.get(MoodleIndex)).Type);
    }

    public String getMoodleDisplayString(int MoodleIndex) {
        return MoodleType.getDisplayName(((Moodle)this.MoodleList.get(MoodleIndex)).Type, ((Moodle)this.MoodleList.get(MoodleIndex)).getLevel());
    }

    public String getMoodleDescriptionString(int MoodleIndex) {
        return MoodleType.getDescriptionText(((Moodle)this.MoodleList.get(MoodleIndex)).Type, ((Moodle)this.MoodleList.get(MoodleIndex)).getLevel());
    }

    public int getMoodleLevel(int MoodleIndex) {
        return ((Moodle)this.MoodleList.get(MoodleIndex)).getLevel();
    }

    public int getMoodleLevel(MoodleType MType) {
        return ((Moodle)this.MoodleList.get(MoodleType.ToIndex(MType))).getLevel();
    }

    public int getMoodleChevronCount(int moodleIndex) {
        return ((Moodle)this.MoodleList.get(moodleIndex)).getChevronCount();
    }

    public boolean getMoodleChevronIsUp(int moodleIndex) {
        return ((Moodle)this.MoodleList.get(moodleIndex)).isChevronIsUp();
    }

    public Color getMoodleChevronColor(int moodleIndex) {
        return ((Moodle)this.MoodleList.get(moodleIndex)).getChevronColor();
    }

    public MoodleType getMoodleType(int MoodleIndex) {
        return ((Moodle)this.MoodleList.get(MoodleIndex)).Type;
    }

    public int getNumMoodles() {
        return this.MoodleList.size();
    }

    public void Randomise() {
    }

    public boolean UI_RefreshNeeded() {
        if (this.MoodlesStateChanged) {
            this.MoodlesStateChanged = false;
            return true;
        } else {
            return false;
        }
    }

    public void setMoodlesStateChanged(boolean refresh) {
        this.MoodlesStateChanged = refresh;
    }

    public void Update() {
        for (int _int = 0; _int < this.MoodleList.size(); _int++) {
            if (((Moodle)this.MoodleList.get(_int)).Update()) {
                this.MoodlesStateChanged = true;
            }
        }
    }
}
